<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Wasm Test</title>
</head>
<body>

<script type="module">
    import init, {addValue, addValueToBuffer, getValueFromBuffer, getValueFromBufferIndex, getWasmMemoryBufferPointer, fetchTile} from './pkg/wasm_test.js';

    init().then((module) => {
        /*addValueToBuffer(4);
        const value = getValueFromBuffer();
        console.info(value);

        //Adds additional 6 bytes to the 1Mb memory
        module.memory.grow(6);
        const memory = module.memory.buffer;
        const buffer = new Uint8Array(memory);
        const bufferPointer = getWasmMemoryBufferPointer();
        console.info(buffer[bufferPointer]);

        buffer[bufferPointer + 1] = 10;
        const value2 = getValueFromBufferIndex();
        console.info(value2);*/


        fetchTile("mactrem/com-tiles").then(res =>{
            console.info(res);
        });

    });
</script>

</body>
</html>
